

import request from '@/utils/request'

//获取分类列表
export const cateList = (params)=>{
    return request({
            method:"get",
            url:"/goods/catelist",
            params
    })
}

//修改分类

export const editCate = (data)=>{
    return request({
            method:"POST",
            url:"/goods/editcate",
            data
    })
}

//商品列表
export const goodsList = (params)=>{
    return request({
            method:"GET",
            url:"/goods/list",
            params
    })
}

//分类添加
export const addCate = (data)=>{
    return request({
            method:"POST",
            url:"/goods/addcate",
            data
    })
}


//获取商品详情
export const goodsInfo = (params)=>{
    return request({
            method:"get",
            url:"/goods/goodsInfo",
            params
    })
}
//获取所有的分类名
export const cateAllList = ()=>{
    return request({
            method:"get",
            url:"/goods/categories",
    })
}

//修改商品详情
export const editGoodsInfo = (data)=>{
    return request({
            method:"POST",
            url:"/goods/edit",
            data
    })
}
